{% extends user.is_superuser|yesno:"admin/bootstraped_base_site.html,registration/normaluser_bootstraped_base_site.html" %}
{% load i18n %}{% load url from future %}

{% if user.is_superuser %}
	{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/forms.css" />{% endblock %}
	{% block breadcrumbs %}
	<ul class="breadcrumb">
	<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> <span class="divider">/</span></li>
	<li>{% trans 'Password change' %}</a>
	</ul>
	{% endblock %}

	{% block title %}{% trans 'Password change' %}{% endblock %}
{% endif %}

{% block content_title %}
	{% if user.is_superuser %}
		<a class="brand">{% trans 'Password change' %}</a>
	{% else %}
		{% trans 'Password change' %}
	{% endif %}
{% endblock %}

{% block content %}<div id="content-main">

<form class="form-horizontal" action="" method="post">{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger">
    {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
</div>
{% endif %}

<div class="alert alert-info">{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</div>

<fieldset class="_module _aligned wide">

<div class="control-group">
    <div class="control-label">
        <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>
    </div>
    <div class="controls">
        {{ form.old_password }}
        {% if form.old_password.errors %}<span class="help-inline">{{ form.old_password.errors|striptags }}</span>{% endif %}
    </div>
</div>

<div class="control-group">
    <div class="control-label">
        <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>
    </div>
    <div class="controls">
        {{ form.new_password1 }}
        {% if form.new_password1.errors %} <span class="help-inline">{{ form.new_password1.errors|striptags }}</span>{% endif %}
    </div>
</div>

<div class="control-group">
    <div class="control-label">
        <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>
    </div>
    <div class="controls">
        {{ form.new_password2 }}
        {% if form.new_password2.errors %} <span class="help-inline">{{ form.new_password2.errors|striptags }}</span>{% endif %}
    </div>
</div>

</fieldset>

<div class="form-actions">
    <input type="submit" value="{% trans 'Change my password' %}" class="default btn-primary" />
</div>

<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</form></div>

{% endblock %}
